1. Field of the Invention
The present invention relates to a security technique for a semiconductor memory.
2. Description of the Background Art
For protection against unjust reading of data stored in a semiconductor memory or against unjust writing of data into a semiconductor memory, encryption techniques have been used. Encryption of commands for a semiconductor memory makes it hard to observe the commands and further makes it impossible to actually generate any unjust command.
As another method specialized for protection against unjust writing, a memory array is divided into blocks of certain capacity and a flag bit (implemented by a nonvolatile memory) for protection against writing is provided for each block. For a flag bit corresponding to an object block for writing, a system makes it “write enabled” prior to writing and then writes data into the object block. After writing of data, the system makes the flag bit “write disabled” (protected), to ensure protection against writing.
The Patent Document 1, Japanese Patent Application Laid Open Gazette No. 2005-108273, relates to a semiconductor memory in which a protect flag is stored in a memory block. In the technique disclosed in the Patent Document 1, when a write command is inputted from a host, the content of the protect flag is checked and if the protect flag indicates “write enabled”, writing of data is performed.
As discussed above, using an encryption technique makes it difficult to observe a command. When a command is encrypted, however, the processing speed disadvantageously decreases. That is because the encrypted command needs to be decrypted by using a predetermined algorithm and the load of this processing is heavy. Though a scramble processing whose load is light may be used in order to avoid this problem, since the scramble processing is weak in security, this processing disadvantageously increases possibility of decoding the command.
Further, the above method in which a flag bit is provided to ensure protection against writing can not also protect a semiconductor memory in terms of security. Specifically, this method is a technique for protection against unintended writing due to, e.g., runaway of software in a writing system, not against writing by a malevolent outsider.
The technique disclosed in the above Patent Document 1 is used to disable a system from writing data if the protect flag is on, not used to take protective measures against fraudulent actions in consideration of the possibility of manipulating the protect flag by using an unjust program.